pip install --upgrade pip
Python interpreter will be restarted.
Collecting pip
Downloading pip-21.1.1-py3-none-any.whl (1.5 MB)
Installing collected packages: pip
Attempting uninstall: pip
Found existing installation: pip 20.2.4
Uninstalling pip-20.2.4:
Successfully uninstalled pip-20.2.4
Successfully installed pip-21.1.1
Python interpreter will be restarted.
!pip install sodapy
!pip install pillow
!pip install wordcloud
!pip install missingno
Collecting sodapy
Downloading sodapy-2.1.0-py2.py3-none-any.whl (14 kB)
Requirement already satisfied: requests>=2.20.0 in /databricks/python3/lib/python3.8/site-packages (from sodapy) (2.24.0)
Requirement already satisfied: idna<3,>=2.5 in /databricks/python3/lib/python3.8/site-packages (from requests>=2.20.0->sodapy) (2.10)
Requirement already satisfied: certifi>=2017.4.17 in /databricks/python3/lib/python3.8/site-packages (from requests>=2.20.0->sodapy) (2020.12.5)
Requirement already satisfied: chardet<4,>=3.0.2 in /databricks/python3/lib/python3.8/site-packages (from requests>=2.20.0->sodapy) (3.0.4)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /databricks/python3/lib/python3.8/site-packages (from requests>=2.20.0->sodapy) (1.25.11)
Installing collected packages: sodapy
Successfully installed sodapy-2.1.0
Collecting pillow
Downloading Pillow-8.2.0-cp38-cp38-manylinux1_x86_64.whl (3.0 MB)
| | 10 kB 18.7 MB/s eta 0:00:01
|▏ | 20 kB 24.4 MB/s eta 0:00:01
|▎ | 30 kB 13.4 MB/s eta 0:00:01
|▍ | 40 kB 10.2 MB/s eta 0:00:01
|▌ | 51 kB 8.3 MB/s eta 0:00:01
|▋ | 61 kB 7.2 MB/s eta 0:00:01
|▊ | 71 kB 7.9 MB/s eta 0:00:01
|▉ | 81 kB 8.0 MB/s eta 0:00:01
|█ | 92 kB 7.0 MB/s eta 0:00:01
|█ | 102 kB 6.9 MB/s eta 0:00:01
|█▏ | 112 kB 6.9 MB/s eta 0:00:01
|█▎ | 122 kB 6.9 MB/s eta 0:00:01
|█▍ | 133 kB 6.9 MB/s eta 0:00:01
|█▌ | 143 kB 6.9 MB/s eta 0:00:01
|█▋ | 153 kB 6.9 MB/s eta 0:00:01
|█▊ | 163 kB 6.9 MB/s eta 0:00:01
|█▉ | 174 kB 6.9 MB/s eta 0:00:01
|██ | 184 kB 6.9 MB/s eta 0:00:01
|██ | 194 kB 6.9 MB/s eta 0:00:01
|██▏ | 204 kB 6.9 MB/s eta 0:00:01
|██▎ | 215 kB 6.9 MB/s eta 0:00:01
|██▍ | 225 kB 6.9 MB/s eta 0:00:01
|██▌ | 235 kB 6.9 MB/s eta 0:00:01
|██▋ | 245 kB 6.9 MB/s eta 0:00:01
|██▊ | 256 kB 6.9 MB/s eta 0:00:01
|██▉ | 266 kB 6.9 MB/s eta 0:00:01
|███ | 276 kB 6.9 MB/s eta 0:00:01
|███ | 286 kB 6.9 MB/s eta 0:00:01
|███▏ | 296 kB 6.9 MB/s eta 0:00:01
|███▎ | 307 kB 6.9 MB/s eta 0:00:01
|███▍ | 317 kB 6.9 MB/s eta 0:00:01
|███▌ | 327 kB 6.9 MB/s eta 0:00:01
|███▋ | 337 kB 6.9 MB/s eta 0:00:01
|███▊ | 348 kB 6.9 MB/s eta 0:00:01
|███▉ | 358 kB 6.9 MB/s eta 0:00:01
|████ | 368 kB 6.9 MB/s eta 0:00:01
|████ | 378 kB 6.9 MB/s eta 0:00:01
|████▏ | 389 kB 6.9 MB/s eta 0:00:01
|████▎ | 399 kB 6.9 MB/s eta 0:00:01
|████▍ | 409 kB 6.9 MB/s eta 0:00:01
|████▌ | 419 kB 6.9 MB/s eta 0:00:01
|████▋ | 430 kB 6.9 MB/s eta 0:00:01
|████▊ | 440 kB 6.9 MB/s eta 0:00:01
|████▉ | 450 kB 6.9 MB/s eta 0:00:01
|█████ | 460 kB 6.9 MB/s eta 0:00:01
|█████ | 471 kB 6.9 MB/s eta 0:00:01
|█████▏ | 481 kB 6.9 MB/s eta 0:00:01
|█████▎ | 491 kB 6.9 MB/s eta 0:00:01
|█████▍ | 501 kB 6.9 MB/s eta 0:00:01
|█████▌ | 512 kB 6.9 MB/s eta 0:00:01
|█████▋ | 522 kB 6.9 MB/s eta 0:00:01
|█████▊ | 532 kB 6.9 MB/s eta 0:00:01
|█████▉ | 542 kB 6.9 MB/s eta 0:00:01
|██████ | 552 kB 6.9 MB/s eta 0:00:01
|██████ | 563 kB 6.9 MB/s eta 0:00:01
|██████▏ | 573 kB 6.9 MB/s eta 0:00:01
|██████▎ | 583 kB 6.9 MB/s eta 0:00:01
|██████▍ | 593 kB 6.9 MB/s eta 0:00:01
|██████▌ | 604 kB 6.9 MB/s eta 0:00:01
|██████▋ | 614 kB 6.9 MB/s eta 0:00:01
|██████▊ | 624 kB 6.9 MB/s eta 0:00:01
|██████▉ | 634 kB 6.9 MB/s eta 0:00:01
|███████ | 645 kB 6.9 MB/s eta 0:00:01
|███████ | 655 kB 6.9 MB/s eta 0:00:01
|███████▏ | 665 kB 6.9 MB/s eta 0:00:01
|███████▎ | 675 kB 6.9 MB/s eta 0:00:01
|███████▍ | 686 kB 6.9 MB/s eta 0:00:01
|███████▌ | 696 kB 6.9 MB/s eta 0:00:01
|███████▋ | 706 kB 6.9 MB/s eta 0:00:01
|███████▊ | 716 kB 6.9 MB/s eta 0:00:01
|███████▉ | 727 kB 6.9 MB/s eta 0:00:01
|████████ | 737 kB 6.9 MB/s eta 0:00:01
|████████ | 747 kB 6.9 MB/s eta 0:00:01
|████████▏ | 757 kB 6.9 MB/s eta 0:00:01
|████████▎ | 768 kB 6.9 MB/s eta 0:00:01
|████████▍ | 778 kB 6.9 MB/s eta 0:00:01
|████████▌ | 788 kB 6.9 MB/s eta 0:00:01
|████████▋ | 798 kB 6.9 MB/s eta 0:00:01
|████████▊ | 808 kB 6.9 MB/s eta 0:00:01
|████████▉ | 819 kB 6.9 MB/s eta 0:00:01
|█████████ | 829 kB 6.9 MB/s eta 0:00:01
|█████████ | 839 kB 6.9 MB/s eta 0:00:01
|█████████▏ | 849 kB 6.9 MB/s eta 0:00:01
|█████████▎ | 860 kB 6.9 MB/s eta 0:00:01
|█████████▍ | 870 kB 6.9 MB/s eta 0:00:01
|█████████▌ | 880 kB 6.9 MB/s eta 0:00:01
|█████████▋ | 890 kB 6.9 MB/s eta 0:00:01
|█████████▊ | 901 kB 6.9 MB/s eta 0:00:01
|█████████▉ | 911 kB 6.9 MB/s eta 0:00:01
|██████████ | 921 kB 6.9 MB/s eta 0:00:01
|██████████ | 931 kB 6.9 MB/s eta 0:00:01
|██████████▏ | 942 kB 6.9 MB/s eta 0:00:01
|██████████▎ | 952 kB 6.9 MB/s eta 0:00:01
|██████████▍ | 962 kB 6.9 MB/s eta 0:00:01
|██████████▌ | 972 kB 6.9 MB/s eta 0:00:01
|██████████▋ | 983 kB 6.9 MB/s eta 0:00:01
|██████████▊ | 993 kB 6.9 MB/s eta 0:00:01
|██████████▉ | 1.0 MB 6.9 MB/s eta 0:00:01
|███████████ | 1.0 MB 6.9 MB/s eta 0:00:01
|███████████ | 1.0 MB 6.9 MB/s eta 0:00:01
|███████████▏ | 1.0 MB 6.9 MB/s eta 0:00:01
|███████████▎ | 1.0 MB 6.9 MB/s eta 0:00:01
|███████████▍ | 1.1 MB 6.9 MB/s eta 0:00:01
|███████████▌ | 1.1 MB 6.9 MB/s eta 0:00:01
|███████████▋ | 1.1 MB 6.9 MB/s eta 0:00:01
|███████████▊ | 1.1 MB 6.9 MB/s eta 0:00:01
|███████████▉ | 1.1 MB 6.9 MB/s eta 0:00:01
|████████████ | 1.1 MB 6.9 MB/s eta 0:00:01
|████████████ | 1.1 MB 6.9 MB/s eta 0:00:01
|████████████▏ | 1.1 MB 6.9 MB/s eta 0:00:01
|████████████▎ | 1.1 MB 6.9 MB/s eta 0:00:01
|████████████▍ | 1.1 MB 6.9 MB/s eta 0:00:01
|████████████▌ | 1.2 MB 6.9 MB/s eta 0:00:01
|████████████▋ | 1.2 MB 6.9 MB/s eta 0:00:01
|████████████▊ | 1.2 MB 6.9 MB/s eta 0:00:01
|████████████▉ | 1.2 MB 6.9 MB/s eta 0:00:01
|█████████████ | 1.2 MB 6.9 MB/s eta 0:00:01
|█████████████ | 1.2 MB 6.9 MB/s eta 0:00:01
|█████████████▏ | 1.2 MB 6.9 MB/s eta 0:00:01
|█████████████▎ | 1.2 MB 6.9 MB/s eta 0:00:01
|█████████████▍ | 1.2 MB 6.9 MB/s eta 0:00:01
|█████████████▌ | 1.2 MB 6.9 MB/s eta 0:00:01
|█████████████▋ | 1.3 MB 6.9 MB/s eta 0:00:01
|█████████████▊ | 1.3 MB 6.9 MB/s eta 0:00:01
|█████████████▉ | 1.3 MB 6.9 MB/s eta 0:00:01
|██████████████ | 1.3 MB 6.9 MB/s eta 0:00:01
|██████████████ | 1.3 MB 6.9 MB/s eta 0:00:01
|██████████████▏ | 1.3 MB 6.9 MB/s eta 0:00:01
|██████████████▎ | 1.3 MB 6.9 MB/s eta 0:00:01
|██████████████▍ | 1.3 MB 6.9 MB/s eta 0:00:01
|██████████████▌ | 1.3 MB 6.9 MB/s eta 0:00:01
|██████████████▋ | 1.4 MB 6.9 MB/s eta 0:00:01
|██████████████▊ | 1.4 MB 6.9 MB/s eta 0:00:01
|██████████████▉ | 1.4 MB 6.9 MB/s eta 0:00:01
|███████████████ | 1.4 MB 6.9 MB/s eta 0:00:01
|███████████████ | 1.4 MB 6.9 MB/s eta 0:00:01
|███████████████▏ | 1.4 MB 6.9 MB/s eta 0:00:01
|███████████████▎ | 1.4 MB 6.9 MB/s eta 0:00:01
|███████████████▍ | 1.4 MB 6.9 MB/s eta 0:00:01
|███████████████▌ | 1.4 MB 6.9 MB/s eta 0:00:01
|███████████████▋ | 1.4 MB 6.9 MB/s eta 0:00:01
|███████████████▊ | 1.5 MB 6.9 MB/s eta 0:00:01
|███████████████▉ | 1.5 MB 6.9 MB/s eta 0:00:01
|████████████████ | 1.5 MB 6.9 MB/s eta 0:00:01
|████████████████ | 1.5 MB 6.9 MB/s eta 0:00:01
|████████████████▏ | 1.5 MB 6.9 MB/s eta 0:00:01
|████████████████▎ | 1.5 MB 6.9 MB/s eta 0:00:01
|████████████████▍ | 1.5 MB 6.9 MB/s eta 0:00:01
|████████████████▌ | 1.5 MB 6.9 MB/s eta 0:00:01
|████████████████▋ | 1.5 MB 6.9 MB/s eta 0:00:01
|████████████████▊ | 1.5 MB 6.9 MB/s eta 0:00:01
|████████████████▉ | 1.6 MB 6.9 MB/s eta 0:00:01
|█████████████████ | 1.6 MB 6.9 MB/s eta 0:00:01
|█████████████████ | 1.6 MB 6.9 MB/s eta 0:00:01
|█████████████████▏ | 1.6 MB 6.9 MB/s eta 0:00:01
|█████████████████▎ | 1.6 MB 6.9 MB/s eta 0:00:01
|█████████████████▍ | 1.6 MB 6.9 MB/s eta 0:00:01
|█████████████████▌ | 1.6 MB 6.9 MB/s eta 0:00:01
|█████████████████▋ | 1.6 MB 6.9 MB/s eta 0:00:01
|█████████████████▊ | 1.6 MB 6.9 MB/s eta 0:00:01
|█████████████████▉ | 1.6 MB 6.9 MB/s eta 0:00:01
|██████████████████ | 1.7 MB 6.9 MB/s eta 0:00:01
|██████████████████ | 1.7 MB 6.9 MB/s eta 0:00:01
|██████████████████▏ | 1.7 MB 6.9 MB/s eta 0:00:01
|██████████████████▎ | 1.7 MB 6.9 MB/s eta 0:00:01
|██████████████████▍ | 1.7 MB 6.9 MB/s eta 0:00:01
|██████████████████▌ | 1.7 MB 6.9 MB/s eta 0:00:01
|██████████████████▋ | 1.7 MB 6.9 MB/s eta 0:00:01
|██████████████████▊ | 1.7 MB 6.9 MB/s eta 0:00:01
|██████████████████▉ | 1.7 MB 6.9 MB/s eta 0:00:01
|███████████████████ | 1.8 MB 6.9 MB/s eta 0:00:01
|███████████████████ | 1.8 MB 6.9 MB/s eta 0:00:01
|███████████████████▏ | 1.8 MB 6.9 MB/s eta 0:00:01
|███████████████████▎ | 1.8 MB 6.9 MB/s eta 0:00:01
|███████████████████▍ | 1.8 MB 6.9 MB/s eta 0:00:01
|███████████████████▌ | 1.8 MB 6.9 MB/s eta 0:00:01
|███████████████████▋ | 1.8 MB 6.9 MB/s eta 0:00:01
|███████████████████▊ | 1.8 MB 6.9 MB/s eta 0:00:01
|███████████████████▉ | 1.8 MB 6.9 MB/s eta 0:00:01
|████████████████████ | 1.8 MB 6.9 MB/s eta 0:00:01
|████████████████████ | 1.9 MB 6.9 MB/s eta 0:00:01
|████████████████████▏ | 1.9 MB 6.9 MB/s eta 0:00:01
|████████████████████▎ | 1.9 MB 6.9 MB/s eta 0:00:01
|████████████████████▍ | 1.9 MB 6.9 MB/s eta 0:00:01
|████████████████████▌ | 1.9 MB 6.9 MB/s eta 0:00:01
|████████████████████▋ | 1.9 MB 6.9 MB/s eta 0:00:01
|████████████████████▊ | 1.9 MB 6.9 MB/s eta 0:00:01
|████████████████████▉ | 1.9 MB 6.9 MB/s eta 0:00:01
|█████████████████████ | 1.9 MB 6.9 MB/s eta 0:00:01
|█████████████████████ | 1.9 MB 6.9 MB/s eta 0:00:01
|█████████████████████▏ | 2.0 MB 6.9 MB/s eta 0:00:01
|█████████████████████▎ | 2.0 MB 6.9 MB/s eta 0:00:01
|█████████████████████▍ | 2.0 MB 6.9 MB/s eta 0:00:01
|█████████████████████▌ | 2.0 MB 6.9 MB/s eta 0:00:01
|█████████████████████▋ | 2.0 MB 6.9 MB/s eta 0:00:01
|█████████████████████▊ | 2.0 MB 6.9 MB/s eta 0:00:01
|█████████████████████▉ | 2.0 MB 6.9 MB/s eta 0:00:01
|██████████████████████ | 2.0 MB 6.9 MB/s eta 0:00:01
|██████████████████████ | 2.0 MB 6.9 MB/s eta 0:00:01
|██████████████████████▏ | 2.0 MB 6.9 MB/s eta 0:00:01
|██████████████████████▎ | 2.1 MB 6.9 MB/s eta 0:00:01
|██████████████████████▍ | 2.1 MB 6.9 MB/s eta 0:00:01
|██████████████████████▌ | 2.1 MB 6.9 MB/s eta 0:00:01
|██████████████████████▋ | 2.1 MB 6.9 MB/s eta 0:00:01
|██████████████████████▊ | 2.1 MB 6.9 MB/s eta 0:00:01
|██████████████████████▉ | 2.1 MB 6.9 MB/s eta 0:00:01
|███████████████████████ | 2.1 MB 6.9 MB/s eta 0:00:01
|███████████████████████ | 2.1 MB 6.9 MB/s eta 0:00:01
|███████████████████████▏ | 2.1 MB 6.9 MB/s eta 0:00:01
|███████████████████████▎ | 2.2 MB 6.9 MB/s eta 0:00:01
|███████████████████████▍ | 2.2 MB 6.9 MB/s eta 0:00:01
|███████████████████████▌ | 2.2 MB 6.9 MB/s eta 0:00:01
|███████████████████████▋ | 2.2 MB 6.9 MB/s eta 0:00:01
|███████████████████████▊ | 2.2 MB 6.9 MB/s eta 0:00:01
|███████████████████████▉ | 2.2 MB 6.9 MB/s eta 0:00:01
|████████████████████████ | 2.2 MB 6.9 MB/s eta 0:00:01
|████████████████████████ | 2.2 MB 6.9 MB/s eta 0:00:01
|████████████████████████▏ | 2.2 MB 6.9 MB/s eta 0:00:01
|████████████████████████▎ | 2.2 MB 6.9 MB/s eta 0:00:01
|████████████████████████▍ | 2.3 MB 6.9 MB/s eta 0:00:01
|████████████████████████▌ | 2.3 MB 6.9 MB/s eta 0:00:01
|████████████████████████▋ | 2.3 MB 6.9 MB/s eta 0:00:01
|████████████████████████▊ | 2.3 MB 6.9 MB/s eta 0:00:01
|████████████████████████▉ | 2.3 MB 6.9 MB/s eta 0:00:01
|█████████████████████████ | 2.3 MB 6.9 MB/s eta 0:00:01
|█████████████████████████ | 2.3 MB 6.9 MB/s eta 0:00:01
|█████████████████████████▏ | 2.3 MB 6.9 MB/s eta 0:00:01
|█████████████████████████▎ | 2.3 MB 6.9 MB/s eta 0:00:01
|█████████████████████████▍ | 2.3 MB 6.9 MB/s eta 0:00:01
|█████████████████████████▌ | 2.4 MB 6.9 MB/s eta 0:00:01
|█████████████████████████▋ | 2.4 MB 6.9 MB/s eta 0:00:01
|█████████████████████████▊ | 2.4 MB 6.9 MB/s eta 0:00:01
|█████████████████████████▉ | 2.4 MB 6.9 MB/s eta 0:00:01
|██████████████████████████ | 2.4 MB 6.9 MB/s eta 0:00:01
|██████████████████████████ | 2.4 MB 6.9 MB/s eta 0:00:01
|██████████████████████████▏ | 2.4 MB 6.9 MB/s eta 0:00:01
|██████████████████████████▎ | 2.4 MB 6.9 MB/s eta 0:00:01
|██████████████████████████▍ | 2.4 MB 6.9 MB/s eta 0:00:01
|██████████████████████████▌ | 2.4 MB 6.9 MB/s eta 0:00:01
|██████████████████████████▋ | 2.5 MB 6.9 MB/s eta 0:00:01
|██████████████████████████▊ | 2.5 MB 6.9 MB/s eta 0:00:01
|██████████████████████████▉ | 2.5 MB 6.9 MB/s eta 0:00:01
|███████████████████████████ | 2.5 MB 6.9 MB/s eta 0:00:01
|███████████████████████████ | 2.5 MB 6.9 MB/s eta 0:00:01
|███████████████████████████▏ | 2.5 MB 6.9 MB/s eta 0:00:01
|███████████████████████████▎ | 2.5 MB 6.9 MB/s eta 0:00:01
|███████████████████████████▍ | 2.5 MB 6.9 MB/s eta 0:00:01
|███████████████████████████▌ | 2.5 MB 6.9 MB/s eta 0:00:01
|███████████████████████████▋ | 2.5 MB 6.9 MB/s eta 0:00:01
|███████████████████████████▊ | 2.6 MB 6.9 MB/s eta 0:00:01
|███████████████████████████▉ | 2.6 MB 6.9 MB/s eta 0:00:01
|████████████████████████████ | 2.6 MB 6.9 MB/s eta 0:00:01
|████████████████████████████ | 2.6 MB 6.9 MB/s eta 0:00:01
|████████████████████████████▏ | 2.6 MB 6.9 MB/s eta 0:00:01
|████████████████████████████▎ | 2.6 MB 6.9 MB/s eta 0:00:01
|████████████████████████████▍ | 2.6 MB 6.9 MB/s eta 0:00:01
|████████████████████████████▌ | 2.6 MB 6.9 MB/s eta 0:00:01
|████████████████████████████▋ | 2.6 MB 6.9 MB/s eta 0:00:01
|████████████████████████████▊ | 2.7 MB 6.9 MB/s eta 0:00:01
|████████████████████████████▉ | 2.7 MB 6.9 MB/s eta 0:00:01
|█████████████████████████████ | 2.7 MB 6.9 MB/s eta 0:00:01
|█████████████████████████████ | 2.7 MB 6.9 MB/s eta 0:00:01
|█████████████████████████████▏ | 2.7 MB 6.9 MB/s eta 0:00:01
|█████████████████████████████▎ | 2.7 MB 6.9 MB/s eta 0:00:01
|█████████████████████████████▍ | 2.7 MB 6.9 MB/s eta 0:00:01
|█████████████████████████████▌ | 2.7 MB 6.9 MB/s eta 0:00:01
|█████████████████████████████▋ | 2.7 MB 6.9 MB/s eta 0:00:01
|█████████████████████████████▊ | 2.7 MB 6.9 MB/s eta 0:00:01
|█████████████████████████████▉ | 2.8 MB 6.9 MB/s eta 0:00:01
|██████████████████████████████ | 2.8 MB 6.9 MB/s eta 0:00:01
|██████████████████████████████ | 2.8 MB 6.9 MB/s eta 0:00:01
|██████████████████████████████▏ | 2.8 MB 6.9 MB/s eta 0:00:01
|██████████████████████████████▎ | 2.8 MB 6.9 MB/s eta 0:00:01
|██████████████████████████████▍ | 2.8 MB 6.9 MB/s eta 0:00:01
|██████████████████████████████▌ | 2.8 MB 6.9 MB/s eta 0:00:01
|██████████████████████████████▋ | 2.8 MB 6.9 MB/s eta 0:00:01
|██████████████████████████████▊ | 2.8 MB 6.9 MB/s eta 0:00:01
|██████████████████████████████▉ | 2.8 MB 6.9 MB/s eta 0:00:01
|███████████████████████████████ | 2.9 MB 6.9 MB/s eta 0:00:01
|███████████████████████████████ | 2.9 MB 6.9 MB/s eta 0:00:01
|███████████████████████████████▏| 2.9 MB 6.9 MB/s eta 0:00:01
|███████████████████████████████▎| 2.9 MB 6.9 MB/s eta 0:00:01
|███████████████████████████████▍| 2.9 MB 6.9 MB/s eta 0:00:01
|███████████████████████████████▌| 2.9 MB 6.9 MB/s eta 0:00:01
|███████████████████████████████▋| 2.9 MB 6.9 MB/s eta 0:00:01
|███████████████████████████████▊| 2.9 MB 6.9 MB/s eta 0:00:01
|███████████████████████████████▉| 2.9 MB 6.9 MB/s eta 0:00:01
|████████████████████████████████| 2.9 MB 6.9 MB/s eta 0:00:01
|████████████████████████████████| 3.0 MB 6.9 MB/s
Installing collected packages: pillow
Successfully installed pillow-8.2.0
Collecting wordcloud
Downloading wordcloud-1.8.1-cp38-cp38-manylinux1_x86_64.whl (371 kB)
|▉ | 10 kB 19.9 MB/s eta 0:00:01
|█▊ | 20 kB 14.9 MB/s eta 0:00:01
|██▋ | 30 kB 10.3 MB/s eta 0:00:01
|███▌ | 40 kB 8.9 MB/s eta 0:00:01
|████▍ | 51 kB 6.3 MB/s eta 0:00:01
|█████▎ | 61 kB 5.9 MB/s eta 0:00:01
|██████▏ | 71 kB 6.4 MB/s eta 0:00:01
|███████ | 81 kB 7.2 MB/s eta 0:00:01
|████████ | 92 kB 6.5 MB/s eta 0:00:01
|████████▉ | 102 kB 5.1 MB/s eta 0:00:01
|█████████▊ | 112 kB 5.1 MB/s eta 0:00:01
|██████████▋ | 122 kB 5.1 MB/s eta 0:00:01
|███████████▌ | 133 kB 5.1 MB/s eta 0:00:01
|████████████▎ | 143 kB 5.1 MB/s eta 0:00:01
|█████████████▏ | 153 kB 5.1 MB/s eta 0:00:01
|██████████████ | 163 kB 5.1 MB/s eta 0:00:01
|███████████████ | 174 kB 5.1 MB/s eta 0:00:01
|███████████████▉ | 184 kB 5.1 MB/s eta 0:00:01
|████████████████▊ | 194 kB 5.1 MB/s eta 0:00:01
|█████████████████▋ | 204 kB 5.1 MB/s eta 0:00:01
|██████████████████▌ | 215 kB 5.1 MB/s eta 0:00:01
|███████████████████▍ | 225 kB 5.1 MB/s eta 0:00:01
|████████████████████▎ | 235 kB 5.1 MB/s eta 0:00:01
|█████████████████████▏ | 245 kB 5.1 MB/s eta 0:00:01
|██████████████████████ | 256 kB 5.1 MB/s eta 0:00:01
|███████████████████████ | 266 kB 5.1 MB/s eta 0:00:01
|███████████████████████▉ | 276 kB 5.1 MB/s eta 0:00:01
|████████████████████████▋ | 286 kB 5.1 MB/s eta 0:00:01
|█████████████████████████▌ | 296 kB 5.1 MB/s eta 0:00:01
|██████████████████████████▍ | 307 kB 5.1 MB/s eta 0:00:01
|███████████████████████████▎ | 317 kB 5.1 MB/s eta 0:00:01
|████████████████████████████▏ | 327 kB 5.1 MB/s eta 0:00:01
|█████████████████████████████ | 337 kB 5.1 MB/s eta 0:00:01
|██████████████████████████████ | 348 kB 5.1 MB/s eta 0:00:01
|██████████████████████████████▉ | 358 kB 5.1 MB/s eta 0:00:01
|███████████████████████████████▊| 368 kB 5.1 MB/s eta 0:00:01
|████████████████████████████████| 371 kB 5.1 MB/s
Requirement already satisfied: pillow in /local_disk0/.ephemeral_nfs/envs/pythonEnv-b3454f07-8a2a-4ecc-b7b5-893ddaaefd69/lib/python3.8/site-packages (from wordcloud) (8.2.0)
Requirement already satisfied: numpy>=1.6.1 in /databricks/python3/lib/python3.8/site-packages (from wordcloud) (1.19.2)
Requirement already satisfied: matplotlib in /databricks/python3/lib/python3.8/site-packages (from wordcloud) (3.2.2)
Requirement already satisfied: cycler>=0.10 in /databricks/python3/lib/python3.8/site-packages (from matplotlib->wordcloud) (0.10.0)
Requirement already satisfied: python-dateutil>=2.1 in /databricks/python3/lib/python3.8/site-packages (from matplotlib->wordcloud) (2.8.1)
Requirement already satisfied: kiwisolver>=1.0.1 in /databricks/python3/lib/python3.8/site-packages (from matplotlib->wordcloud) (1.3.0)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in /databricks/python3/lib/python3.8/site-packages (from matplotlib->wordcloud) (2.4.7)
Requirement already satisfied: six in /usr/local/lib/python3.8/site-packages (from cycler>=0.10->matplotlib->wordcloud) (1.15.0)
Installing collected packages: wordcloud
Successfully installed wordcloud-1.8.1
Collecting missingno
Downloading missingno-0.4.2-py3-none-any.whl (9.7 kB)
Requirement already satisfied: scipy in /databricks/python3/lib/python3.8/site-packages (from missingno) (1.5.2)
Requirement already satisfied: matplotlib in /databricks/python3/lib/python3.8/site-packages (from missingno) (3.2.2)
Requirement already satisfied: seaborn in /databricks/python3/lib/python3.8/site-packages (from missingno) (0.10.0)
Requirement already satisfied: numpy in /databricks/python3/lib/python3.8/site-packages (from missingno) (1.19.2)
Requirement already satisfied: python-dateutil>=2.1 in /databricks/python3/lib/python3.8/site-packages (from matplotlib->missingno) (2.8.1)
Requirement already satisfied: cycler>=0.10 in /databricks/python3/lib/python3.8/site-packages (from matplotlib->missingno) (0.10.0)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in /databricks/python3/lib/python3.8/site-packages (from matplotlib->missingno) (2.4.7)
Requirement already satisfied: kiwisolver>=1.0.1 in /databricks/python3/lib/python3.8/site-packages (from matplotlib->missingno) (1.3.0)
Requirement already satisfied: six in /usr/local/lib/python3.8/site-packages (from cycler>=0.10->matplotlib->missingno) (1.15.0)
Requirement already satisfied: pandas>=0.22.0 in /databricks/python3/lib/python3.8/site-packages (from seaborn->missingno) (1.1.3)
Requirement already satisfied: pytz>=2017.2 in /databricks/python3/lib/python3.8/site-packages (from pandas>=0.22.0->seaborn->missingno) (2020.5)
Installing collected packages: missingno
Successfully installed missingno-0.4.2
%%time
from sodapy import Socrata
import pandas as pd
client = Socrata("data.cityofnewyork.us", None)
# Set the timeout in secondsclient.timeout = 360
#https://data.cityofnewyork.us/Social-Services/311-Service-Requests-from-2010-to-Present/erm2-nwe9 results = client.get("erm2-nwe9",
select="unique_key,created_date,closed_date,agency,complaint_type,descriptor,status,borough,Open_Data_Channel_Type",
order="created_date DESC", where="created_date > '2020' AND created_date < '2021' AND status = 'Closed'", limit=3000000
)
df = pd.DataFrame.from_records(results)
WARNING:root:Requests made without an app_token will be subject to strict throttling limits.
CPU times: user 18.3 s, sys: 3.28 s, total: 21.6 s
Wall time: 1min 28s
# Check to make sure the data we pulled is within the right size limit for the projectdf.info(memory_usage="deep")
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 2482841 entries, 0 to 2482840
Data columns (total 9 columns):
# Column Dtype
--- ------ -----
0 unique_key object
1 created_date object
2 closed_date object
3 agency object
4 complaint_type object
5 descriptor object
6 status object
7 borough object
8 Open_Data_Channel_Type object
dtypes: object(9)
memory usage: 1.4 GB
# First and last day of data we havedf[['created_date', 'closed_date']] = df[['created_date', 'closed_date']].apply(pd.to_datetime)
print('Initial_Retrieved_date:',df['created_date'].max())
print('Final_Retrieved_date:',df['closed_date'].min())
Initial_Retrieved_date: 2020-12-31 23:59:55
Final_Retrieved_date: 2020-01-01 00:03:35
# Some of the complaint types only are logged once, so we want to remove those from the data.# So, removed any complaint types that haven't been used more than 5 times in 1 yearvalue_counts = df['complaint_type'].value_counts()
to_remove = value_counts[value_counts <= 5].index
df.drop(df[df['complaint_type'].isin(to_remove)].index, inplace = True)
df_unique = df['complaint_type'].value_counts()
print(df_unique.shape)
(155,)
# Creating columns month, hour, and resolution time for further analysisfrom datetime import timedelta
import numpy as np
df[["created_dd_mm_yyy"]]=df.created_date.map(lambda x: x.strftime('%Y-%m-%d'))
df[["month"]]=pd.DatetimeIndex(df["created_date"]).month
df[["hour"]]=pd.DatetimeIndex(df["created_date"]).hour
df['resolution_time'] = (df['closed_date'] - df['created_date']).dt.days
df.head(5)
Out[20]:
# An array of unique complaint types to see the variety of what these look likecomplaints=df['complaint_type'].unique()
complaintsOut[19]: array(['Noise - Vehicle', 'Homeless Street Condition',
'Noise - Residential', 'Blocked Driveway', 'Noise - Helicopter',
'HEAT/HOT WATER', 'NonCompliance with Phased Reopening',
'Illegal Fireworks', 'Lead', 'Illegal Parking',
'Sanitation Condition', 'Noise - Commercial', 'Sewer',
'Noise - Street/Sidewalk', 'Street Condition',
'Mass Gathering Complaint', 'Non-Emergency Police Matter',
'Street Sign - Damaged', 'Street Sign - Dangling',
'Abandoned Vehicle', 'Consumer Complaint', 'Drug Activity',
'Noise - House of Worship', 'Traffic Signal Condition',
'Water System', 'Noise', 'UNSANITARY CONDITION', 'Rodent',
'PLUMBING', 'Sidewalk Condition', 'APPLIANCE', 'Drinking',
'Street Light Condition', 'Water Quality',
'Emergency Response Team (ERT)', 'WATER LEAK', 'Building/Use',
'General Construction/Plumbing', 'GENERAL', 'Elevator', 'Traffic',
'ELECTRIC', 'PAINT/PLASTER', 'Lost Property', 'Animal-Abuse',
'Indoor Air Quality', 'DOOR/WINDOW', 'Noise - Park',
'Missed Collection (All Materials)', 'Broken Parking Meter',
'Panhandling', 'Air Quality', 'FLOORING/STAIRS',
'Bus Stop Shelter Complaint', 'Dirty Conditions', 'Curb Condition',
'Outdoor Dining', 'Highway Condition', 'Maintenance or Facility',
'Illegal Tree Damage', 'Damaged Tree', 'Boilers',
'Highway Sign - Missing', 'Vending', 'Overgrown Tree/Branches',
'Drinking Water', 'Plumbing',
'Private or Charter School Reopening', 'Graffiti',
'Homeless Person Assistance',
'COVID-19 Non-essential Construction',
'Special Projects Inspection Team (SPIT)',
'Unsanitary Pigeon Condition', 'Taxi Complaint',
'Violation of Park Rules', 'SAFETY', 'Asbestos',
'Animal in a Park', 'Urinating in Public', 'Derelict Bicycle',
'Root/Sewer/Sidewalk Condition', 'For Hire Vehicle Complaint',
'Indoor Sewage', 'Dead/Dying Tree', 'ELEVATOR',
'Bike Rack Condition', 'Hazardous Materials', 'Derelict Vehicles',
'Street Sign - Missing', 'Water Conservation',
'Unsanitary Animal Pvt Property', 'DEP Street Condition',
'Ferry Complaint', 'Food Poisoning',
'Investigations and Discipline (IAD)', 'Other Enforcement',
'Taxi Report', 'Bike/Roller/Skate Chronic',
'Home Delivered Meal - Missed Delivery', 'Unleashed Dog',
'Taxi Compliment', 'Electrical', 'Snow', 'BEST/Site Safety',
'Illegal Animal Kept as Pet', 'Unsanitary Animal Facility',
'Bridge Condition', 'Wood Pile Remaining',
'For Hire Vehicle Report', 'Ferry Inquiry',
'Recycling Enforcement', 'OUTSIDE BUILDING',
'Beach/Pool/Sauna Complaint', 'Uprooted Stump', 'Industrial Waste',
'Scaffold Safety', 'Disorderly Youth', 'New Tree Request',
'Highway Sign - Damaged', 'Bus Stop Shelter Placement',
'Public Payphone Complaint', 'Borough Office', 'Squeegee', 'Mold',
'Highway Sign - Dangling', 'Cranes and Derricks',
'School Maintenance', 'Vacant Lot', 'Pet Shop', 'LinkNYC',
'X-Ray Machine/Equipment', 'Illegal Animal Sold', 'Mosquitoes',
'Building Marshals office', 'Non-Residential Heat', 'Plant',
'Radioactive Material', 'Bottled Water', 'Posting Advertisement',
'Cooling Tower', 'Animal Facility - No Permit',
'Special Natural Area District (SNAD)', 'Green Taxi Report',
'Public Toilet', 'Overflowing Litter Baskets', 'Standing Water',
'Snow Removal', 'Food Establishment', 'Day Care',
'Building Condition', 'Lifeguard', 'Poison Ivy',
'Homeless Encampment', 'Smoking', 'Home Delivered Meal Complaint'],
dtype=object)
# Days with highest number of complaints loggedprint("Days with highest number of complaints")
df.created_dd_mm_yyy.value_counts().nlargest(10)
Days with highest number of complaints
Out[22]: 2020-08-04 18924
2020-08-05 16054
2020-07-05 15868
2020-07-04 15244
2020-06-20 14945
2020-06-21 14766
2020-06-28 12659
2020-06-27 11854
2020-08-09 11618
2020-08-01 11415
Name: created_dd_mm_yyy, dtype: int64
# Days with lowest number of complaints loggedprint("Days with lowest number of complaints")
df.created_dd_mm_yyy.value_counts().nsmallest(10)
Days with lowest number of complaints
Out[23]: 2020-03-29 3261
2020-03-28 3366
2020-04-18 3666
2020-04-26 3782
2020-03-22 3823
2020-04-05 3862
2020-04-04 3945
2020-03-26 4009
2020-04-03 4028
2020-01-19 4032
Name: created_dd_mm_yyy, dtype: int64
# How are people opening tickets?import matplotlib as mpl
from matplotlib import pyplot as plt
colors = ['#639ace','#ca6b39','#7f67ca','#5ba85f','#c360aa','#a7993f','#cc566a']
df['Open_Data_Channel_Type'].value_counts().plot(kind='pie',autopct='%1.1f%%',
startangle=45, shadow=False, colors = colors,
figsize = (8,6))
plt.axis('equal')
plt.title('How are people opening tickets?')
plt.tight_layout()
plt.show()
# Graph to see a value count by boroughcolors = ['#639ace','#ca6b39','#7f67ca','#5ba85f','#c360aa','#a7993f','#cc566a']
df['borough'].value_counts().plot(kind='pie',autopct='%1.1f%%',
startangle=45, shadow=False, colors = colors,
figsize = (8,6))
plt.axis('equal')
plt.title('2020 Complaints by Borough')
plt.tight_layout()
plt.show()
# Top Complaintsdf.complaint_type.value_counts().nlargest(10)
Out[29]: Noise - Residential 407045
Noise - Street/Sidewalk 206709
Illegal Parking 194275
HEAT/HOT WATER 164597
Blocked Driveway 116751
Non-Emergency Police Matter 83936
Noise - Vehicle 81191
UNSANITARY CONDITION 61572
Damaged Tree 57571
NonCompliance with Phased Reopening 51996
Name: complaint_type, dtype: int64
# Find percent of each complaint typedf_complaint = df['complaint_type'].value_counts()[:15].sort_values(ascending=False) / len(df)
sizes = df_complaint.values.tolist()
labels = df_complaint.index.values.tolist()
# Pie chart for complaint typefig1, ax1 = plt.subplots(figsize=(10,10))
ax1.pie(sizes, labels=labels, autopct='%1.1f%%', shadow=False, textprops={'fontsize': 14})
ax1.axis('equal')
plt.title("% of complaint type")
plt.show()
# WordCloud librariesfrom PIL import Image
from wordcloud import WordCloud, STOPWORDS, ImageColorGenerator
# Group by complaint_type and count the frequency of unique keystotal=df.groupby(["complaint_type"],as_index=False).agg({"unique_key": "count"})
total.sample(5)
# Dataframe for WordCloudtop50=total.nlargest(50,"unique_key")
# Select text for WordCloudtext = top50["complaint_type"]
exclude = ["type", "dtype","Name","object"]
stopwords = STOPWORDS.update(exclude) # STOPWORDS is a of type Set
wc = WordCloud(scale = 15,
max_font_size=30,
background_color = 'white',
stopwords = stopwords)
wc.generate(str(text))
#S how figurefig = plt.figure(figsize = (10,6))
plt.imshow(wc, interpolation = 'bilinear')
plt.axis('off')
plt.tight_layout(pad=0)
print("Top 50 Complaints")
plt.show()
Top 50 Complaints
# Group by complaint_type and count the frequency of unique keystotal2=df.groupby(["descriptor"],as_index=False).agg({"unique_key": "count"})
total2.sample(5)
# Dataframe for WordCloudtop50_2=total2.nlargest(50,"unique_key")
top50_2.sample(5)
# Select text for WordCloudtext = top50_2["descriptor"]
exclude = ["type", "dtype","Name","object"]
#stopwords = STOPWORDS.update(exclude) # STOPWORDS is a of type Set wc = WordCloud(scale = 15,
max_font_size=30,
background_color = 'white')
wc.generate(str(text))
#S how figurefig = plt.figure(figsize = (10,6))
plt.imshow(wc, interpolation = 'bilinear')
plt.axis('off')
plt.tight_layout(pad=0)
print("Top 50 Descriptors")
plt.show()
Top 50 Descriptors
# Now look at those same descriptors by boroughdescriptor_borough = df.pivot_table(index="descriptor", columns = "borough", values = "unique_key", aggfunc = "count")
descriptor_borough = descriptor_borough.sort_values(by=['BROOKLYN'],ascending=False)
descriptor_borough.iloc[:10,:5].plot(kind="bar", figsize=(10,10)).set(title="Number of Complaints by Descriptor and Borough", ylabel = "Count")
# Source for colorful graphic:# https://towardsdatascience.com/has-quarantine-made-you-hate-your-loud-neighbors-these-charts-certainly-imply-it-c760e999a04bOut[36]:
[Text(0, 0.5, 'Count'),
Text(0.5, 1.0, 'Number of Complaints by Descriptor and Borough')]
# Count of Agencyprint('Count of agencies:', (df['agency'].value_counts().count()))
print('List of agencies with total count of complaints logged:\n', (df['agency'].value_counts()))
Count of agencies: 16
List of agencies with total count of complaints logged:
NYPD 1269236
HPD 412155
DOT 188234
DEP 139768
DSNY 108019
DPR 107230
DOB 82796
MAYORâS OFFICE OF SPECIAL ENFORCEMENT 54405
DCA 34801
DOHMH 34427
DHS 26468
TLC 11261
EDC 10359
DFTA 2374
DOE 831
DOITT 428
Name: agency, dtype: int64
# Average response time by agency (in days)grouped_df = df.groupby("agency")
mean_df = grouped_df["resolution_time"].mean()
mean_df = mean_df.reset_index()
#print(mean_df) figure(figsize=(20, 6), dpi=80)
ax6=mean_df.plot(kind='barh',x='agency', title="Average Resolution Time by Agency")
ax6.set_xlabel("Resolution Time (days)")
ax6.set_ylabel("Agency")
Out[38]: /databricks/python/lib/python3.8/site-packages/matplotlib/backends/backend_agg.py:214: RuntimeWarning: Glyph 128 missing from current font.
font.set_text(s, 0.0, flags=flags)
/databricks/python/lib/python3.8/site-packages/matplotlib/backends/backend_agg.py:214: RuntimeWarning: Glyph 153 missing from current font.
font.set_text(s, 0.0, flags=flags)
/databricks/python/lib/python3.8/site-packages/matplotlib/backends/backend_agg.py:183: RuntimeWarning: Glyph 128 missing from current font.
font.set_text(s, 0, flags=flags)
/databricks/python/lib/python3.8/site-packages/matplotlib/backends/backend_agg.py:183: RuntimeWarning: Glyph 153 missing from current font.
font.set_text(s, 0, flags=flags)
Text(0, 0.5, 'Agency')
# What type of complaint does the Mayors office of Special Enforcement handle?mayor= df[df['agency'] == 'MAYORâS OFFICE OF SPECIAL ENFORCEMENT']
mayor.complaint_type.value_counts().nlargest(100)
Out[40]: NonCompliance with Phased Reopening 51747
Mass Gathering Complaint 1816
Private or Charter School Reopening 842
Name: complaint_type, dtype: int64
# Examine when each agency is busy during the dayagency = df.pivot_table(index="hour", columns = "agency", values = "unique_key", aggfunc = "count")
agency.plot(kind="line", figsize=(20,15)).set(title="Responding Agency by Hour", ylabel = "Count")
Out[41]: /databricks/python/lib/python3.8/site-packages/matplotlib/backends/backend_agg.py:214: RuntimeWarning: Glyph 128 missing from current font.
font.set_text(s, 0.0, flags=flags)
/databricks/python/lib/python3.8/site-packages/matplotlib/backends/backend_agg.py:214: RuntimeWarning: Glyph 153 missing from current font.
font.set_text(s, 0.0, flags=flags)
/databricks/python/lib/python3.8/site-packages/matplotlib/backends/backend_agg.py:183: RuntimeWarning: Glyph 128 missing from current font.
font.set_text(s, 0, flags=flags)
/databricks/python/lib/python3.8/site-packages/matplotlib/backends/backend_agg.py:183: RuntimeWarning: Glyph 153 missing from current font.
font.set_text(s, 0, flags=flags)
[Text(0, 0.5, 'Count'), Text(0.5, 1.0, 'Responding Agency by Hour')]
# Now that we've only pulled COVID related complaint types, lets look at the most common descriptorsfigure(figsize=(20, 6), dpi=80)
ax4=coviddf.descriptor.value_counts().nlargest(20).plot(kind='barh', title="Top 20 Descriptors of COVID Related Complaints")
ax4.set_xlabel("Count")
ax4.set_ylabel("Descriptor")
Out[45]:
Text(0, 0.5, 'Descriptor')
# Lets plot the COVID complaints over the course of 2020df_ctype_by_month = coviddf.month.value_counts()
df_ctype_by_month.head(12)
ax5=coviddf['month'].value_counts().sort_index().plot(kind='bar', title="Count of COVID related tickets opened monthly in 2020")
ax5.set_xlabel("Month")
ax5.set_ylabel("Count")
Out[46]:
Text(0, 0.5, 'Count')
# Lets plot the descriptors over the course of 2020coviddf2 = coviddf.pivot_table(index="month", columns = "descriptor", values = "unique_key", aggfunc = "count")
coviddf2.plot(kind="bar", figsize=(10,10)).set(title="COVID Descriptors by Month", ylabel = "Count")
Out[47]:
[Text(0, 0.5, 'Count'), Text(0.5, 1.0, 'COVID Descriptors by Month')]
# What are these complaint type (COVID related) resolution_time (in days)?covidgrouped_df = coviddf.groupby("descriptor")
covidmean_df = covidgrouped_df["resolution_time"].mean()
covidmean_df = covidmean_df.reset_index()
figure(figsize=(20, 6), dpi=80)
ax5=covidmean_df.plot(kind='barh',x='descriptor', title="Average Resolution Time of COVID Related Complaints")
ax5.set_xlabel("Resolution Time (days)")
ax5.set_ylabel("Descriptor")
Out[48]:
Text(0, 0.5, 'Descriptor')
# What time of day are COVID complaints being called in?coviddf3 = coviddf.pivot_table(index="hour", columns = "descriptor", values = "unique_key", aggfunc = "count")
coviddf3.plot(kind="line", figsize=(10,10)).set(title="COVID Descriptors by Hour", ylabel = "Count")
Out[49]:
[Text(0, 0.5, 'Count'), Text(0.5, 1.0, 'COVID Descriptors by Hour')]
# Same idea as above, but what time of day are calls being called in grouped by agency agency2 = coviddf.pivot_table(index="hour", columns = "agency", values = "unique_key", aggfunc = "count")
agency2.plot(kind="line", figsize=(20,15)).set(title="Responding Agency by Hour for COVID Complaints", ylabel = "Count")
Out[50]: /databricks/python/lib/python3.8/site-packages/matplotlib/backends/backend_agg.py:214: RuntimeWarning: Glyph 128 missing from current font.
font.set_text(s, 0.0, flags=flags)
/databricks/python/lib/python3.8/site-packages/matplotlib/backends/backend_agg.py:214: RuntimeWarning: Glyph 153 missing from current font.
font.set_text(s, 0.0, flags=flags)
/databricks/python/lib/python3.8/site-packages/matplotlib/backends/backend_agg.py:183: RuntimeWarning: Glyph 128 missing from current font.
font.set_text(s, 0, flags=flags)
/databricks/python/lib/python3.8/site-packages/matplotlib/backends/backend_agg.py:183: RuntimeWarning: Glyph 153 missing from current font.
font.set_text(s, 0, flags=flags)
[Text(0, 0.5, 'Count'),
Text(0.5, 1.0, 'Responding Agency by Hour for COVID Complaints')]
# Which agency handled which complaint types or descriptors?coviddf4 = coviddf.pivot_table(index="agency", columns = "descriptor", values = "unique_key", aggfunc = "count")
coviddf4.plot(kind="barh", figsize=(10,10)).set(title="Who is responding to COVID complaints?", ylabel = "Agency",xlabel="Count")
Out[52]: /databricks/python/lib/python3.8/site-packages/matplotlib/backends/backend_agg.py:214: RuntimeWarning: Glyph 128 missing from current font.
font.set_text(s, 0.0, flags=flags)
/databricks/python/lib/python3.8/site-packages/matplotlib/backends/backend_agg.py:214: RuntimeWarning: Glyph 153 missing from current font.
font.set_text(s, 0.0, flags=flags)
/databricks/python/lib/python3.8/site-packages/matplotlib/backends/backend_agg.py:183: RuntimeWarning: Glyph 128 missing from current font.
font.set_text(s, 0, flags=flags)
/databricks/python/lib/python3.8/site-packages/matplotlib/backends/backend_agg.py:183: RuntimeWarning: Glyph 153 missing from current font.
font.set_text(s, 0, flags=flags)
[Text(0, 0.5, 'Agency'),
Text(0.5, 0, 'Count'),
Text(0.5, 1.0, 'Who is responding to COVID complaints?')]
# How has COVID-19 changes response times?# Examine average response times pre and post March 2020 in our top complaint, Noise - Residentialcoviddf4=df[df['complaint_type'] == 'Noise - Residential']
covid_time = coviddf4.pivot_table(index="month", columns = "complaint_type", values = "resolution_time", aggfunc = np.mean)
covid_time.plot(kind="line", figsize=(10,10)).set(title="Average Response Times for Residential Noise", ylabel = "Response Time (in days)")
Out[53]:
[Text(0, 0.5, 'Response Time (in days)'),
Text(0.5, 1.0, 'Average Response Times for Residential Noise')]
# Does the above graph make sense with the spikes in number of residential noise calls and in the context of the pandemic shutting things down in March?noise = coviddf4.pivot_table(index="month", columns = "complaint_type", values = "unique_key", aggfunc = "count")
noise.plot(kind="line", figsize=(10,10)).set(title="Count of Residential Noise Complaints by Month", ylabel = "Count")
Out[54]:
[Text(0, 0.5, 'Count'),
Text(0.5, 1.0, 'Count of Residential Noise Complaints by Month')]
NYC 311 service requests & COVID-19
Hypotheses- How has COVID-19 influenced 311 complaints in NYC?